import React, {Component} from "react";
import AudioPlay from "./Components/PlayBar/AudioPlay";
import "./App.css";
import TopBar from './Components/TopBar/TopBar'
import Recommend from "./Components/Recommend/Recommend";
import PlayList from "./Components/PlayList/PlayList";
import {HashRouter, Route, Routes} from "react-router-dom";
import LoginQQ from "./Components/LoginQQ/LoginQQ";
import Login163 from "./Components/Login163/Login163";
import SearchPage from "./Components/SearchPage/SearchPage";
import SingerDetail from "./Components/SingerDetail/SingerDetail";
import PlayListPage from "./Components/PlayListPage/PlayListPage";
import AlbumDetail from './Components/AlbumDetail/AlbumDetail'
import TopList from './Components/TopList/TopList'
import {createTheme, ThemeProvider} from "@mui/material/styles";
import SingerListPage from "./Components/SingerListPage/SingerListPage";
import AddMenu from "./Components/AddMenu/AddMenu";
import LocalList from "./Components/LocalList/LocalList";


const theme = createTheme({
    typography: {
        fontFamily: 'Microsoft JhengHei',
        fontWeightBold:'bold'
    },
});

class App extends Component {
    constructor(props) {
        super(props);
        this.state = {
            show: true
        };
    }



    render() {

        return (
            <div id='global'>
                <ThemeProvider theme={theme}>
                    <HashRouter>
                        <TopBar />
                        <Routes>
                            <Route path="/" element={<Recommend/>}/>
                            <Route path="/recommend" element={<Recommend/>}/>
                            <Route path="/playlistPage" element={<PlayListPage/>}/>
                            <Route path="/playlist" element={<PlayList/>}/>
                            <Route path="/singerDetail" element={<SingerDetail/>}/>
                            <Route path="/albumDetail" element={<AlbumDetail />}/>
                            <Route path="/topList" element={<TopList />}/>
                            <Route path="/singerListPage" element={<SingerListPage />}/>
                            <Route path="/search">
                                <Route path="songs" element={<SearchPage main='songs'/>}/>
                                <Route path="singers" element={<SearchPage main='singers'/>}/>
                                <Route path="playlists" element={<SearchPage main='playlists'/>}/>
                                <Route path="album" element={<SearchPage main='album'/>}/>
                                <Route path="" element={<SearchPage main='songs'/>}/>
                            </Route>
                        </Routes>
                    </HashRouter>
                    <AudioPlay/>
                    <LoginQQ />
                    <Login163 />
                    <AddMenu/>
                </ThemeProvider>
                <LocalList />
            </div>
        );
    }
}

export default App;
